//
//  YKFragmentViewDelegate.swift
//  YKSwiftViews
//
//  Created by edward on 2023/10/25.
//  Copyright © 2023 Edward（本内容遵循MIT协议）. All rights reserved.
//

import UIKit


@objc public protocol YKFragmentViewDelegate: NSObjectProtocol {
    
    func fragmentViewSetUpSubDelegate(_ fragmentView:YKFragmentView) -> [YKFragmentSubViewDelegate]
    
    func fragmentViewResetViewLayout(_ fragmentView:YKFragmentView, header:UIView, bottom:UIView)
    
    @objc optional func fragmentViewFirstLoadShowIndex(_ fragmentView:YKFragmentView) -> Int
    
    @objc optional func fragmentView(_ fragmentView:YKFragmentView, sizeOfHeaderItemAt indexPath:IndexPath) -> CGSize
    
    @objc optional func fragmentView(_ fragmentView:YKFragmentView, viewForHeaderAt indexPath:IndexPath, _ itemContentView:UIView, _ isSelect:Bool) -> UIView
    
    @objc optional func fragmentViewHeaderScrollDidAnimated(_ fragmentView:YKFragmentView) -> Bool
}

@objc public protocol YKFragmentSubViewDelegate: NSObjectProtocol {
    
    func fragmentSubViewSetupMainView() -> UIView
    
    @objc optional func fragmentSubViewViewDidAppear()
    
    @objc optional func fragmentSubViewViewDidDisappear()
    
    @objc optional func fragmentSubViewSizeOfHeaderItem() -> CGSize
    
    @objc optional func fragmentSubViewViewForHeader(_ itemContentView: UIView, _ isSelect:Bool) -> UIView
}
